<?php if(isset($data['id'])&&$data['id']>0): ?>
<?php
$label = (isset($label)&&$label!=='')?$label:'Illustration';
$media = (isset($data['media']))?$data['media']:null; 
$module = (isset($module)&&$module!=='')?$module:'';
$maxWidth = (isset($maxWidth)&&$maxWidth>0)?$maxWidth:0;
$maxHeight = (isset($maxHeight)&&$maxHeight>0)?$maxHeight:0;
?>
<?php if(isset($labelMedia)): ?>
<?php if($labelMedia!==''): ?>
<h3><?php echo $labelMedia; ?></h3>
<?php endif; ?>
<?php else: ?>
<h3><?php echo $label; ?> :</h3>
<?php endif; ?>
<div align="center">
    <div id="mediaPublication">    
    <?php if($media!==null && $media->getId()>0): ?>
        <img src="<?php echo $media->getUrl('../'); ?>" title="<?php echo $media->getTitle(); ?>" class="media_modele"/>
    </div>
    <div id="mediaAction">
        <a id="removeMediaPublicationBtn" href="javascript:removeMedia(<?php echo $data['id']; ?>,<?php echo $media->getId(); ?>,'<?php echo $data['modele']; ?>',<?php echo $maxWidth; ?>,<?php echo $maxHeight; ?>,'<?php echo $module; ?>');" class="confirmAction pwe-ui-btn" title="Supprimer le media '<?php echo $media->getTitle(); ?>'">Supprimer</a> 
        <a class="pwe-ui-btn" href="javascript:openUpdateMedia(<?php echo $data['id']; ?>,'<?php echo $media->getId(); ?>','<?php echo $data['modele']; ?>',<?php echo $maxWidth; ?>,<?php echo $maxHeight; ?>,'<?php echo $module; ?>');">modifier</a>
    </div>
    <?php else: ?>
    </div>
    <div id="mediaAction">
        <a class="pwe-ui-btn" href="javascript:openAddMedia(<?php echo $data['id']; ?>,'<?php echo $data['modele']; ?>',<?php echo $maxWidth; ?>,<?php echo $maxHeight; ?>,'<?php echo $module; ?>');">définir</a>
    </div>
    <?php endif; ?>
</div>
<?php elseif(isset($logo_media_id)): ?>
<?php $media = ($logo_media_id>0)?new modele_media($logo_media_id):null; ?>
<h2>Logo :</h2>
<div>
    <div id="mediaPublication">
    <?php if($media!==null && $media->getId()>0): ?>
        <img src="<?php echo $media->getUrl('../'); ?>" title="<?php echo $media->getTitle(); ?>" class="media_modele"/>
    </div>
    <div id="mediaAction">
        <a id="removeMediaPublicationBtn" href="javascript:removeMedia(0,<?php echo $media->getId(); ?>,'logo');" class="confirmAction pwe-ui-btn" title="Supprimer le logo">Supprimer</a> 
        <a class="pwe-ui-btn" href="javascript:openUpdateMedia(0,'<?php echo $media->getId(); ?>','logo');">modifier</a>
    </div>
    <?php else: ?>
    </div>
    <div id="mediaAction">
        <a class="pwe-ui-btn" href="javascript:openAddMedia(0,'logo');">définir</a>
    </div>
    <?php endif; ?>
<input type="hidden" name="design_logo_media_id" id="logo_media_id" value="<?php echo ($media!==null && $media->getId()>0)?$media->getId():0; ?>" />
</div>
<?php endif; ?>